/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tetris.model.blokken;

/**
 *
 * @author Batist Leman
 */
public class MatrixFabriek {

    public static boolean[][] maakNieuweMatrix(String matrix) {

        boolean inhoud[][] = {{false, false, false},
            {false, false, false},
            {false, false, false},
            {false, false, false}
        };
        String[] lijnen = matrix.split(".");
        for (int j = 0; j < lijnen.length; j++) {
            String lijn = lijnen[j];
            for (int i = 0; i < lijn.length(); i++) {
                if (lijn.charAt(i) == 'x') {
                    inhoud[i][j] = true;
                }
            }
        }

        return inhoud;
    }
}
